package com.peng.pojo;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Time;
import java.util.Objects;

@Table(name = "tb_welfare_castle", schema = "springboot-tuofu", catalog = "")
public class WelfareCastle implements Serializable {
    private int id;
    private Date startDate;
    private Date endDate;
    private String classPeriod;
    private Time startTime;
    private Time endTime;
    private String suitableStudents;
    private Double courseFees;
    private String picture;
    private String syllabus;
    private String classWay;
    private Integer status;
    private String name;
    private User user;
    private CourseType courseType;
    private Activity activity;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public CourseType getCourseType() {
        return courseType;
    }

    public void setCourseType(CourseType courseType) {
        this.courseType = courseType;
    }

    public Activity getActivity() {
        return activity;
    }

    public void setActivity(Activity activity) {
        this.activity = activity;
    }

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "start_date")
    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    @Basic
    @Column(name = "end_date")
    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Basic
    @Column(name = "class_period")
    public String getClassPeriod() {
        return classPeriod;
    }

    public void setClassPeriod(String classPeriod) {
        this.classPeriod = classPeriod;
    }

    @Basic
    @Column(name = "start_time")
    public Time getStartTime() {
        return startTime;
    }

    public void setStartTime(Time startTime) {
        this.startTime = startTime;
    }

    @Basic
    @Column(name = "end_time")
    public Time getEndTime() {
        return endTime;
    }

    public void setEndTime(Time endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "suitable_students")
    public String getSuitableStudents() {
        return suitableStudents;
    }

    public void setSuitableStudents(String suitableStudents) {
        this.suitableStudents = suitableStudents;
    }

    @Basic
    @Column(name = "Course_fees")
    public Double getCourseFees() {
        return courseFees;
    }

    public void setCourseFees(Double courseFees) {
        this.courseFees = courseFees;
    }

    @Basic
    @Column(name = "picture")
    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    @Basic
    @Column(name = "syllabus")
    public String getSyllabus() {
        return syllabus;
    }

    public void setSyllabus(String syllabus) {
        this.syllabus = syllabus;
    }

    @Basic
    @Column(name = "class_way")
    public String getClassWay() {
        return classWay;
    }

    public void setClassWay(String classWay) {
        this.classWay = classWay;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WelfareCastle that = (WelfareCastle) o;
        return id == that.id &&
                Objects.equals(startDate, that.startDate) &&
                Objects.equals(endDate, that.endDate) &&
                Objects.equals(classPeriod, that.classPeriod) &&
                Objects.equals(startTime, that.startTime) &&
                Objects.equals(endTime, that.endTime) &&
                Objects.equals(suitableStudents, that.suitableStudents) &&
                Objects.equals(courseFees, that.courseFees) &&
                Objects.equals(picture, that.picture) &&
                Objects.equals(syllabus, that.syllabus) &&
                Objects.equals(classWay, that.classWay) &&
                Objects.equals(status, that.status) &&
                Objects.equals(name, that.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, startDate, endDate, classPeriod, startTime, endTime, suitableStudents, courseFees, picture, syllabus, classWay, status, name);
    }
}
